package com.block.api.reqbean;

import com.block.source.model.param.UserDataParam;
import com.block.test.reqbean.merchant.ApplyInfoBean;
import com.market.member.model.param.UserSourceParam;

import java.util.HashMap;
import java.util.Map;

/**
 * 根据请求路径转换成 对应的java类
 */
public class ReqBeanUtil {

    private static  Map<String,Class> BEAN=new HashMap<>(10);
    static {
        BEAN.put("/api/member/source/updateSourceInfo", UserSourceParam.class);

        BEAN.put("/apisource/source/registerUser", UserDataParam.class);
        BEAN.put("/apisource/source/checkUser", UserDataParam.class);


        BEAN.put("/api/merchantApply/submitApplyInfo", ApplyInfoBean.class);

    }
    public  static  Class getBeanClass(String uri){
        Class c= BEAN.get(uri);
        //不让外部报错。返回一个object 。
        if(c==null){
            return Object.class;
        }else{
            return c;
        }

    }
}
